//引入配置好的axios

import request from './http'
import request2 from './http2'
import request3 from './http3'
import request4 from './http4'


import qs from 'qs';

// 首页 /wz/fygo/regist
export const getShList = params => { return request({ url: '/wzfygo/shList', method: 'get', params }) } //商户列表
export const getSpList = params => { return request({ url: '/wzfygo/spList', method: 'get', params }) } //商品列表
export const getqbList = params => { return request({ url: '/wzfygo/qbList', method: 'get', params }) } //首页搜索
export const getwdsc = params => { return request({ url: '/wzfygo/scList', method: 'get', params }) } //我的收藏

export const postzhuce = data => { return request4({ url: '/system/fygologin/regist', method: 'post', data: qs.stringify(data) }) } //注册
export const postlogin = data => { return request4({ url: '/system/fygologin/login', method: 'post', data: qs.stringify(data) }) } //登录

export const postsc = data => { return request4({ url: '/system/fygologin/saveCollect', method: 'post', data: qs.stringify(data) }) } //收藏
export const postqxsc = data => { return request4({ url: '/system/fygologin/delCollect', method: 'post', data: qs.stringify(data) }) } //取消收藏

export const postSaveVisit = data => { return request4({ url: '/system/fygologin/saveVisit', method: 'post', data: qs.stringify(data) }) } //用户操作记录
export const getshare = params => { return request4({ url: '/system/fygologin/share', method: 'get', params }) } //分享
export const getUser = params => { return request4({ url: '/system/fygologin/getOpenid', method: 'get', params }) } //获取微信用户信息




// export const postlogout = data => { return request2({ url: '/wz/fygo/loginout', method: 'post', data:qs.stringify(data) }) } 
export const getlogout = params => { return request2({ url: '/wz/fygo/loginout', method: 'get', params }) }//退出登录

export const getdlzt = params => { return request3({ url: '/wz/fygo/isLogin', method: 'get', params }) } //登录状态

export const postCard = data => { return request2({ url: '/hn/saveZuji', method: 'post', data: qs.stringify(data) }) } //打卡
export const getCardList = params => { return request2({ url: '/hn/getZuji', method: 'get', params }) }  //查看打卡


//获取用户列表
// export const getxmml = params => { return request({ url: '/txzstp/xmml', method: 'get', params }) }

//增加用户
// export const addUser = data => { return request({ url: '/wechat/ccr/index', method: 'post', data:qs.stringify(data) }) }
//删除用户
// export const delUser = data => { return request({ url: '你的接口地址', method: 'post', data }) }
//修改用户信息
// export const addUserInfo = data => { return request({ url: '你的接口地址', method: 'post', data }) }
//查询用户详细信息
// export const getUserDetail = params => { return request({ url: '你的接口地址', method: 'get', params }) }